package android.tusnotas.parser.news;

import java.util.List;

import org.htmlcleaner.XPatherException;

import android.tusnotas.beans.Course;
import android.tusnotas.beans.News;
import android.tusnotas.exception.ProcessingInstancesException;
import android.tusnotas.parser.folders.FoldersXStream;

import com.thoughtworks.xstream.XStream;

public class NewsParser {
	public List<News> parseXML(String XML) throws ProcessingInstancesException, XPatherException{

		XStream stream = new FoldersXStream();
		
		Course course = ((Course) stream.fromXML(XML));
		
		return course.getNews();

	}
}
